var app = angular.module('app');

app.factory('objectUtilsService', [function () {
    var objectUtilsService = {};

    /**
     * get properties from a object
     */
    objectUtilsService.getProperties = function (src, properties) {
        var result = {};
        for (var i = 0; i < properties.length; i++) {
            if (src[properties[i]]) {
                result[properties[i]] = src[properties[i]];
            }
        }

        return result;
    };
    return objectUtilsService;
}]);